.class public abstract Les/o7;
.super Les/l9;
.source "MediaEncoder.java"

# interfaces
.implements Lcom/esfile/screen/recorder/media/util/m;


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x15
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/o7$b;,
        Les/o7$c;
    }
.end annotation


# instance fields
.field private A:J

.field private volatile B:Z

.field private volatile C:Z

.field protected final f:Ljava/lang/Object;

.field private volatile g:I

.field protected volatile h:Z

.field protected i:Z

.field protected j:Z

.field protected k:Lcom/esfile/screen/recorder/media/util/n;

.field protected l:Landroid/media/MediaFormat;

.field private m:Landroid/media/MediaCodec$BufferInfo;

.field protected volatile n:Z

.field private volatile o:Z

.field private p:J

.field protected q:J

.field protected r:J

.field protected volatile s:Z

.field protected t:Ljava/lang/Exception;

.field private u:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/media/util/l;",
            ">;"
        }
    .end annotation
.end field

.field private v:Z

.field private volatile w:Z

.field private x:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/media/util/l;",
            ">;"
        }
    .end annotation
.end field

.field private y:J

.field private z:Z


# direct methods
.method public constructor <init>()V
    .locals 5

    .line 1
    invoke-direct {p0}, Les/l9;-><init>()V

    .line 2
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    const-wide/16 v0, 0x0

    .line 3
    iput-wide v0, p0, Les/o7;->q:J

    const/4 v2, 0x0

    .line 4
    iput-boolean v2, p0, Les/o7;->s:Z

    const/4 v3, 0x0

    .line 5
    iput-object v3, p0, Les/o7;->t:Ljava/lang/Exception;

    .line 6
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    iput-object v3, p0, Les/o7;->u:Ljava/util/List;

    const/4 v3, 0x1

    .line 7
    iput-boolean v3, p0, Les/o7;->v:Z

    .line 8
    iput-boolean v2, p0, Les/o7;->w:Z

    .line 9
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    iput-object v4, p0, Les/o7;->x:Ljava/util/List;

    .line 10
    iput-wide v0, p0, Les/o7;->y:J

    .line 11
    iput-boolean v3, p0, Les/o7;->z:Z

    .line 12
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 13
    iput-boolean v2, p0, Les/o7;->B:Z

    .line 14
    iput-boolean v2, p0, Les/o7;->C:Z

    .line 15
    new-instance v0, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {v0}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    iput-object v0, p0, Les/o7;->m:Landroid/media/MediaCodec$BufferInfo;

    return-void
.end method

.method private D()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v1

    if-nez v1, :cond_0

    iget v1, p0, Les/o7;->g:I

    if-lez v1, :cond_0

    .line 3
    iget v1, p0, Les/o7;->g:I

    add-int/lit8 v1, v1, -0x1

    iput v1, p0, Les/o7;->g:I

    .line 4
    :cond_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method static synthetic a(Les/o7;I)I
    .locals 0

    .line 4
    iput p1, p0, Les/l9;->a:I

    return p1
.end method

.method static synthetic a(Les/o7;Ljava/lang/Exception;)V
    .locals 0

    .line 3
    invoke-virtual {p0, p1}, Les/l9;->a(Ljava/lang/Exception;)V

    return-void
.end method

.method static synthetic a(Les/o7;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Les/o7;->v:Z

    return p0
.end method

.method static synthetic a(Les/o7;Z)Z
    .locals 0

    .line 2
    iput-boolean p1, p0, Les/o7;->C:Z

    return p1
.end method

.method static synthetic b(Les/o7;)V
    .locals 0

    .line 1
    invoke-virtual {p0}, Les/l9;->i()V

    return-void
.end method

.method private b(Ljava/lang/String;)V
    .locals 7

    .line 13
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    .line 14
    iget-wide v2, p0, Les/o7;->A:J

    sub-long v2, v0, v2

    const-wide/16 v4, 0x1f4

    cmp-long v6, v2, v4

    if-gez v6, :cond_0

    return-void

    .line 15
    :cond_0
    iput-wide v0, p0, Les/o7;->A:J

    .line 16
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    const-string v1, "exception"

    const-string v2, "LARGEPTSINTERVALERR"

    .line 17
    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v1, "message"

    .line 18
    invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 19
    invoke-static {v0}, Les/la;->a(Landroid/os/Bundle;)V

    return-void
.end method

.method static synthetic b(Les/o7;Z)Z
    .locals 0

    .line 2
    iput-boolean p1, p0, Les/o7;->B:Z

    return p1
.end method

.method static synthetic c(Les/o7;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/o7;->D()V

    return-void
.end method

.method static synthetic d(Les/o7;)Ljava/util/List;
    .locals 0

    .line 1
    iget-object p0, p0, Les/o7;->u:Ljava/util/List;

    return-object p0
.end method

.method static synthetic e(Les/o7;)I
    .locals 0

    .line 1
    iget p0, p0, Les/o7;->g:I

    return p0
.end method

.method static synthetic f(Les/o7;)V
    .locals 0

    .line 1
    invoke-virtual {p0}, Les/l9;->o()V

    return-void
.end method

.method static synthetic g(Les/o7;)V
    .locals 0

    .line 1
    invoke-virtual {p0}, Les/l9;->k()V

    return-void
.end method

.method static synthetic h(Les/o7;)Landroid/media/MediaCodec$BufferInfo;
    .locals 0

    .line 1
    iget-object p0, p0, Les/o7;->m:Landroid/media/MediaCodec$BufferInfo;

    return-object p0
.end method

.method static synthetic i(Les/o7;)V
    .locals 0

    .line 1
    invoke-virtual {p0}, Les/l9;->i()V

    return-void
.end method


# virtual methods
.method protected A()V
    .locals 0

    return-void
.end method

.method protected abstract B()Z
.end method

.method protected C()Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method protected a(ILjava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;)V
    .locals 11
    .annotation build Landroidx/annotation/CallSuper;
    .end annotation

    .line 21
    iget-wide v0, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget-wide v2, p0, Les/o7;->y:J

    cmp-long v4, v0, v2

    if-gez v4, :cond_1

    .line 22
    iget v0, p3, Landroid/media/MediaCodec$BufferInfo;->flags:I

    and-int/lit8 v0, v0, 0x4

    if-eqz v0, :cond_0

    const-wide/16 v0, 0x12c

    add-long/2addr v2, v0

    .line 23
    iput-wide v2, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    goto :goto_0

    :cond_0
    const-wide/16 v0, 0x64

    add-long/2addr v2, v0

    .line 24
    iput-wide v2, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    .line 25
    :cond_1
    :goto_0
    iget-boolean v0, p0, Les/o7;->z:Z

    if-nez v0, :cond_2

    iget-wide v0, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget-wide v2, p0, Les/o7;->y:J

    sub-long/2addr v0, v2

    invoke-static {v0, v1}, Ljava/lang/Math;->abs(J)J

    move-result-wide v0

    const-wide v2, 0xd693a400L

    cmp-long v4, v0, v2

    if-lez v4, :cond_2

    .line 26
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "onFrameDrained, curPTS "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-wide v1, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v1, ", lastPTS "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-wide v1, p0, Les/o7;->y:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v1, ", isAudio "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 27
    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    const-string v1, ", name "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    .line 28
    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/n;->f()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 29
    invoke-direct {p0, v0}, Les/o7;->b(Ljava/lang/String;)V

    .line 30
    :cond_2
    iget-wide v0, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iput-wide v0, p0, Les/o7;->y:J

    .line 31
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 32
    :try_start_0
    iget-object v1, p0, Les/o7;->x:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    const/4 v2, 0x0

    if-eqz v1, :cond_3

    .line 33
    new-instance v1, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {v1}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    .line 34
    iget v4, p3, Landroid/media/MediaCodec$BufferInfo;->offset:I

    iget v5, p3, Landroid/media/MediaCodec$BufferInfo;->size:I

    iget-wide v6, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget v8, p3, Landroid/media/MediaCodec$BufferInfo;->flags:I

    move-object v3, v1

    invoke-virtual/range {v3 .. v8}, Landroid/media/MediaCodec$BufferInfo;->set(IIJI)V

    .line 35
    new-instance p3, Lcom/esfile/screen/recorder/media/util/l;

    iget v6, p0, Les/l9;->a:I

    iget-wide v9, v1, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    move-object v3, p3

    move-object v4, p0

    move v5, p1

    move-object v7, v1

    move-object v8, p2

    invoke-direct/range {v3 .. v10}, Lcom/esfile/screen/recorder/media/util/l;-><init>(Lcom/esfile/screen/recorder/media/util/m;IILandroid/media/MediaCodec$BufferInfo;Ljava/nio/ByteBuffer;J)V

    goto :goto_1

    .line 36
    :cond_3
    iget-object v1, p0, Les/o7;->x:Ljava/util/List;

    invoke-interface {v1, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/esfile/screen/recorder/media/util/l;

    .line 37
    iput-object p2, v1, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    .line 38
    iget-object v3, v1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v4, p3, Landroid/media/MediaCodec$BufferInfo;->offset:I

    iget v5, p3, Landroid/media/MediaCodec$BufferInfo;->size:I

    iget-wide v6, p3, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget v8, p3, Landroid/media/MediaCodec$BufferInfo;->flags:I

    invoke-virtual/range {v3 .. v8}, Landroid/media/MediaCodec$BufferInfo;->set(IIJI)V

    .line 39
    iget p2, p0, Les/l9;->a:I

    iput p2, v1, Lcom/esfile/screen/recorder/media/util/l;->e:I

    .line 40
    iget-object p2, v1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget-wide p2, p2, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iput-wide p2, v1, Lcom/esfile/screen/recorder/media/util/l;->c:J

    .line 41
    iput p1, v1, Lcom/esfile/screen/recorder/media/util/l;->d:I

    move-object p3, v1

    .line 42
    :goto_1
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 43
    invoke-virtual {p0, p3}, Les/l9;->a(Lcom/esfile/screen/recorder/media/util/l;)Z

    move-result p2

    if-nez p2, :cond_4

    .line 44
    iget-object p2, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {p2, p1, v2}, Lcom/esfile/screen/recorder/media/util/n;->a(IZ)V

    .line 45
    :cond_4
    iget-boolean p1, p0, Les/o7;->z:Z

    if-eqz p1, :cond_5

    .line 46
    iput-boolean v2, p0, Les/o7;->z:Z

    :cond_5
    return-void

    :catchall_0
    move-exception p1

    .line 47
    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw p1
.end method

.method public final a(J)V
    .locals 3

    const-string v0, "startRecording"

    .line 5
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    .line 6
    invoke-super {p0, p1, p2}, Les/l9;->a(J)V

    .line 7
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    const/4 v1, 0x1

    .line 8
    :try_start_0
    iput-boolean v1, p0, Les/o7;->s:Z

    const/4 v1, 0x0

    .line 9
    iput-boolean v1, p0, Les/o7;->h:Z

    .line 10
    iput-boolean v1, p0, Les/o7;->n:Z

    .line 11
    iput-boolean v1, p0, Les/o7;->o:Z

    const-wide/16 v1, 0x0

    .line 12
    iput-wide v1, p0, Les/o7;->q:J

    .line 13
    iput-wide p1, p0, Les/o7;->r:J

    .line 14
    iget-object p1, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {p1}, Ljava/lang/Object;->notifyAll()V

    .line 15
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 16
    new-instance p1, Ljava/lang/Thread;

    new-instance p2, Les/o7$c;

    const/4 v0, 0x0

    invoke-direct {p2, p0, v0}, Les/o7$c;-><init>(Les/o7;Les/o7$a;)V

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v2

    if-eqz v2, :cond_0

    const-string v2, "audio"

    goto :goto_0

    :cond_0
    const-string v2, "video"

    :goto_0
    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "encode out thread"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p1, p2, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    invoke-virtual {p1}, Ljava/lang/Thread;->start()V

    .line 17
    invoke-virtual {p0}, Les/o7;->v()Z

    move-result p1

    if-eqz p1, :cond_2

    .line 18
    new-instance p1, Ljava/lang/Thread;

    new-instance p2, Les/o7$b;

    invoke-direct {p2, p0, v0}, Les/o7$b;-><init>(Les/o7;Les/o7$a;)V

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v1

    if-eqz v1, :cond_1

    const-string v1, "audio"

    goto :goto_1

    :cond_1
    const-string v1, "video"

    :goto_1
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, "encode in thread"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p1, p2, v0}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    invoke-virtual {p1}, Ljava/lang/Thread;->start()V

    .line 19
    :cond_2
    invoke-virtual {p0}, Les/o7;->x()V

    return-void

    :catchall_0
    move-exception p1

    .line 20
    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw p1
.end method

.method public a(Lcom/esfile/screen/recorder/media/util/l;Z)V
    .locals 3

    .line 48
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 49
    :try_start_0
    iget-object v1, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v1, :cond_0

    .line 50
    iget-object v1, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    iget v2, p1, Lcom/esfile/screen/recorder/media/util/l;->d:I

    invoke-virtual {v1, v2, p2}, Lcom/esfile/screen/recorder/media/util/n;->a(IZ)V
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    goto :goto_1

    :catch_0
    move-exception p2

    .line 51
    :try_start_1
    invoke-virtual {p2}, Ljava/lang/IllegalStateException;->printStackTrace()V

    .line 52
    :cond_0
    :goto_0
    iget-object p2, p0, Les/o7;->x:Ljava/util/List;

    invoke-interface {p2, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 53
    monitor-exit v0

    return-void

    :goto_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw p1
.end method

.method protected a(Ljava/lang/String;)V
    .locals 2

    .line 54
    new-instance v0, Ljava/lang/StringBuffer;

    invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V

    .line 55
    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v1

    if-eqz v1, :cond_0

    const-string v1, "[audio]"

    goto :goto_0

    :cond_0
    const-string v1, "[video]"

    :goto_0
    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 56
    invoke-virtual {v0, p1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 57
    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object p1

    const-string v0, "mer"

    invoke-static {v0, p1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method protected b(Landroid/media/MediaFormat;)I
    .locals 2

    .line 20
    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "frame-rate"

    .line 21
    invoke-virtual {p1, v0}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 22
    invoke-virtual {p0}, Les/l9;->c()I

    move-result v1

    invoke-virtual {p1, v0, v1}, Landroid/media/MediaFormat;->setInteger(Ljava/lang/String;I)V

    .line 23
    :cond_0
    invoke-super {p0, p1}, Les/l9;->b(Landroid/media/MediaFormat;)I

    move-result p1

    return p1
.end method

.method public b(Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 2

    .line 3
    invoke-virtual {p0, p1}, Les/o7;->c(Lcom/esfile/screen/recorder/media/util/l;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 4
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 5
    :try_start_0
    iget-boolean v1, p0, Les/o7;->s:Z

    if-eqz v1, :cond_1

    iget-boolean v1, p0, Les/o7;->h:Z

    if-eqz v1, :cond_0

    goto :goto_0

    .line 6
    :cond_0
    iget-object v1, p0, Les/o7;->u:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 7
    iget-object p1, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {p1}, Ljava/lang/Object;->notifyAll()V

    goto :goto_1

    .line 8
    :cond_1
    :goto_0
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/l;->a()V

    .line 9
    :goto_1
    monitor-exit v0

    goto :goto_2

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1

    .line 10
    :cond_2
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/l;->a()V

    :goto_2
    return-void
.end method

.method protected b(Ljava/lang/Exception;)V
    .locals 0

    .line 11
    iput-object p1, p0, Les/o7;->t:Ljava/lang/Exception;

    .line 12
    invoke-virtual {p0}, Les/o7;->q()V

    return-void
.end method

.method protected c(Landroid/media/MediaFormat;)V
    .locals 0

    return-void
.end method

.method protected c(Lcom/esfile/screen/recorder/media/util/l;)Z
    .locals 0

    const/4 p1, 0x1

    return p1
.end method

.method protected j()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    invoke-virtual {p0}, Les/o7;->v()Z

    move-result v1

    if-eqz v1, :cond_0

    iget-boolean v1, p0, Les/o7;->C:Z

    if-eqz v1, :cond_1

    :cond_0
    iget-boolean v1, p0, Les/o7;->B:Z

    if-nez v1, :cond_2

    .line 3
    :cond_1
    monitor-exit v0

    return-void

    .line 4
    :cond_2
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 5
    invoke-super {p0}, Les/l9;->j()V

    return-void

    :catchall_0
    move-exception v1

    .line 6
    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1
.end method

.method protected l()V
    .locals 6
    .annotation build Landroidx/annotation/CallSuper;
    .end annotation

    const-string v0, "release enc:"

    .line 1
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-boolean v1, p0, Les/o7;->w:Z

    if-eqz v1, :cond_0

    .line 4
    monitor-exit v0

    return-void

    :cond_0
    const/4 v1, 0x1

    .line 5
    iput-boolean v1, p0, Les/o7;->h:Z

    .line 6
    iput-boolean v1, p0, Les/o7;->i:Z

    .line 7
    iput-boolean v1, p0, Les/o7;->j:Z

    .line 8
    iget-object v2, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {v2}, Ljava/lang/Object;->notifyAll()V

    .line 9
    invoke-virtual {p0}, Les/o7;->v()Z

    move-result v2

    :goto_0
    if-eqz v2, :cond_1

    .line 10
    iget-boolean v3, p0, Les/o7;->C:Z

    if-nez v3, :cond_2

    :cond_1
    iget-boolean v3, p0, Les/o7;->B:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    if-eqz v3, :cond_3

    :cond_2
    :try_start_1
    const-string v3, "wait InputRunnable and OutputRunnable stopped"

    .line 11
    invoke-virtual {p0, v3}, Les/o7;->a(Ljava/lang/String;)V

    .line 12
    iget-object v3, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {v3}, Ljava/lang/Object;->wait()V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    goto :goto_0

    .line 13
    :catch_0
    :cond_3
    :try_start_2
    iget-object v2, p0, Les/o7;->u:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    sub-int/2addr v2, v1

    :goto_1
    if-ltz v2, :cond_4

    .line 14
    iget-object v3, p0, Les/o7;->u:Ljava/util/List;

    invoke-interface {v3, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/esfile/screen/recorder/media/util/l;

    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/l;->a()V

    add-int/lit8 v2, v2, -0x1

    goto :goto_1

    .line 15
    :cond_4
    iget-object v2, p0, Les/o7;->x:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->clear()V

    .line 16
    iget-object v2, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    if-eqz v2, :cond_5

    const/4 v2, 0x0

    .line 17
    :try_start_3
    iget-object v3, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/n;->k()V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    :try_start_4
    const-string v3, "release MediaCodec enc"

    .line 18
    invoke-virtual {p0, v3}, Les/o7;->a(Ljava/lang/String;)V

    .line 19
    iget-object v3, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    .line 20
    :goto_2
    iput-object v2, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_1

    goto :goto_4

    :catchall_0
    move-exception v1

    goto :goto_3

    :catch_1
    move-exception v3

    :try_start_5
    const-string v4, "mer"

    const-string v5, "failed stop MediaCodec"

    .line 21
    invoke-static {v4, v5, v3}, Lcom/esfile/screen/recorder/media/util/k;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    :try_start_6
    const-string v3, "release MediaCodec enc"

    .line 22
    invoke-virtual {p0, v3}, Les/o7;->a(Ljava/lang/String;)V

    .line 23
    iget-object v3, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    goto :goto_2

    :goto_3
    const-string v3, "release MediaCodec enc"

    .line 24
    invoke-virtual {p0, v3}, Les/o7;->a(Ljava/lang/String;)V

    .line 25
    iget-object v3, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    .line 26
    iput-object v2, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    .line 27
    throw v1

    .line 28
    :cond_5
    :goto_4
    iput-boolean v1, p0, Les/o7;->w:Z

    .line 29
    monitor-exit v0

    return-void

    :catchall_1
    move-exception v1

    monitor-exit v0
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_1

    goto :goto_6

    :goto_5
    throw v1

    :goto_6
    goto :goto_5
.end method

.method public final m()V
    .locals 5

    const-string v0, "pauseRecording"

    .line 1
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-boolean v1, p0, Les/o7;->s:Z

    if-eqz v1, :cond_1

    iget-boolean v1, p0, Les/o7;->h:Z

    if-nez v1, :cond_1

    iget-boolean v1, p0, Les/o7;->n:Z

    if-eqz v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x1

    .line 4
    iput-boolean v1, p0, Les/o7;->n:Z

    .line 5
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v1

    const-wide/16 v3, 0x3e8

    div-long/2addr v1, v3

    iput-wide v1, p0, Les/o7;->p:J

    .line 6
    iget-object v1, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 7
    invoke-virtual {p0}, Les/o7;->w()V

    .line 8
    monitor-exit v0

    return-void

    .line 9
    :cond_1
    :goto_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 10
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public final n()Z
    .locals 6

    const-string v0, "max-input-size"

    .line 1
    invoke-super {p0}, Les/l9;->n()Z

    .line 2
    iget-object v1, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v1, :cond_0

    .line 3
    invoke-virtual {p0}, Les/l9;->o()V

    :cond_0
    const/4 v1, 0x0

    .line 4
    iput-boolean v1, p0, Les/o7;->w:Z

    const/4 v2, -0x1

    .line 5
    iput v2, p0, Les/l9;->a:I

    .line 6
    iput-boolean v1, p0, Les/o7;->s:Z

    .line 7
    invoke-virtual {p0}, Les/o7;->B()Z

    move-result v3

    if-eqz v3, :cond_3

    const/4 v3, 0x0

    .line 8
    :try_start_0
    iget-object v4, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v4}, Lcom/esfile/screen/recorder/media/util/n;->e()Landroid/media/MediaFormat;

    move-result-object v3

    .line 9
    invoke-virtual {v3, v0}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_2

    .line 10
    iget-object v4, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v4}, Lcom/esfile/screen/recorder/media/util/n;->d()[Ljava/nio/ByteBuffer;

    move-result-object v4

    if-eqz v4, :cond_2

    .line 11
    array-length v5, v4

    if-lez v5, :cond_2

    .line 12
    aget-object v4, v4, v1

    if-eqz v4, :cond_1

    .line 13
    invoke-virtual {v4}, Ljava/nio/ByteBuffer;->capacity()I

    move-result v1

    :cond_1
    invoke-virtual {v3, v0, v1}, Landroid/media/MediaFormat;->setInteger(Ljava/lang/String;I)V

    .line 14
    :cond_2
    invoke-static {v3, v0, v2}, Lcom/esfile/screen/recorder/media/util/s;->a(Landroid/media/MediaFormat;Ljava/lang/String;I)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 15
    :catch_0
    invoke-virtual {p0, v3}, Les/l9;->a(Landroid/media/MediaFormat;)V

    .line 16
    invoke-virtual {p0, v3}, Les/o7;->c(Landroid/media/MediaFormat;)V

    const/4 v0, 0x1

    return v0

    :cond_3
    return v1
.end method

.method public final q()V
    .locals 7

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "stopRecording "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    const-string v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v1, p0, Les/o7;->h:Z

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    const-string v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v1, p0, Les/o7;->s:Z

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-boolean v1, p0, Les/o7;->s:Z

    if-nez v1, :cond_0

    .line 4
    invoke-virtual {p0}, Les/l9;->o()V

    .line 5
    monitor-exit v0

    return-void

    .line 6
    :cond_0
    iget-boolean v1, p0, Les/o7;->h:Z

    if-eqz v1, :cond_1

    .line 7
    monitor-exit v0

    return-void

    .line 8
    :cond_1
    iget-boolean v1, p0, Les/o7;->n:Z

    if-eqz v1, :cond_2

    .line 9
    iget-wide v1, p0, Les/o7;->q:J

    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v3

    const-wide/16 v5, 0x3e8

    div-long/2addr v3, v5

    iget-wide v5, p0, Les/o7;->p:J

    sub-long/2addr v3, v5

    add-long/2addr v1, v3

    iput-wide v1, p0, Les/o7;->q:J

    .line 10
    :cond_2
    invoke-virtual {p0}, Les/o7;->v()Z

    move-result v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :goto_0
    if-eqz v1, :cond_3

    .line 11
    :try_start_1
    iget-boolean v2, p0, Les/o7;->C:Z

    if-eqz v2, :cond_4

    :cond_3
    iget-boolean v2, p0, Les/o7;->B:Z

    if-nez v2, :cond_5

    .line 12
    :cond_4
    iget-object v2, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {v2}, Ljava/lang/Object;->wait()V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catch_0
    :cond_5
    const/4 v1, 0x1

    .line 13
    :try_start_2
    iput-boolean v1, p0, Les/o7;->h:Z

    .line 14
    iget-object v1, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 15
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 16
    invoke-virtual {p0}, Les/o7;->y()V

    .line 17
    invoke-virtual {p0}, Les/o7;->v()Z

    move-result v0

    if-nez v0, :cond_6

    .line 18
    invoke-virtual {p0}, Les/o7;->C()Z

    :cond_6
    return-void

    :catchall_0
    move-exception v1

    .line 19
    :try_start_3
    monitor-exit v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    goto :goto_2

    :goto_1
    throw v1

    :goto_2
    goto :goto_1
.end method

.method public s()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation

    const-string v0, "suspendRecording"

    .line 1
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-boolean v1, p0, Les/o7;->s:Z

    if-eqz v1, :cond_1

    iget-boolean v1, p0, Les/o7;->h:Z

    if-nez v1, :cond_1

    iget-boolean v1, p0, Les/o7;->o:Z

    if-eqz v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x1

    .line 4
    iput-boolean v1, p0, Les/o7;->o:Z

    .line 5
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 6
    invoke-virtual {p0}, Les/o7;->z()V

    return-void

    .line 7
    :cond_1
    :goto_0
    :try_start_1
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 8
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1
.end method

.method public t()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation

    const-string v0, "unSuspendRecording"

    .line 1
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-boolean v1, p0, Les/o7;->s:Z

    if-eqz v1, :cond_1

    iget-boolean v1, p0, Les/o7;->h:Z

    if-nez v1, :cond_1

    iget-boolean v1, p0, Les/o7;->o:Z

    if-nez v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    .line 4
    iput-boolean v1, p0, Les/o7;->o:Z

    .line 5
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 6
    invoke-virtual {p0}, Les/o7;->A()V

    return-void

    .line 7
    :cond_1
    :goto_0
    :try_start_1
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 8
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1
.end method

.method protected u()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/o7;->f:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-boolean v1, p0, Les/o7;->s:Z

    if-eqz v1, :cond_2

    iget-boolean v1, p0, Les/o7;->h:Z

    if-eqz v1, :cond_0

    goto :goto_1

    .line 3
    :cond_0
    invoke-virtual {p0}, Les/l9;->h()Z

    move-result v1

    const/4 v2, 0x1

    if-eqz v1, :cond_1

    .line 4
    iput v2, p0, Les/o7;->g:I

    goto :goto_0

    .line 5
    :cond_1
    iget v1, p0, Les/o7;->g:I

    add-int/2addr v1, v2

    iput v1, p0, Les/o7;->g:I

    .line 6
    :goto_0
    iget-object v1, p0, Les/o7;->f:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 7
    monitor-exit v0

    return-void

    .line 8
    :cond_2
    :goto_1
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 9
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method protected v()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method protected w()V
    .locals 0

    return-void
.end method

.method protected abstract x()V
.end method

.method protected y()V
    .locals 0

    return-void
.end method

.method protected z()V
    .locals 0

    return-void
.end method
